﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>场馆会员卡</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
    <link href="https://cdn.bootcss.com/amazeui/2.7.2/css/amazeui.css" rel="stylesheet">
    <link href="css/common.css" rel="stylesheet" />
    <style>
        .veads1_i1 {
            display: block;
            float: left;
            margin-top: 2%;
            width: 2.5%;
        }

        .veads1_s1 {
            display: block;
            text-align: center;
            font-size: 1.8rem;
        }

        body {
            background: #f6f6f6;
        }

        .main {
            padding: 3% 5%;
            width: 100%;
            overflow: hidden;
        }

        .main_d1 {
            border-radius: 10px;
            width: 100%;
            overflow: hidden;
            border: none;
            margin-bottom: 3%;
        }

        .am-panel-hd {
            width: 100%;
            background: #e8c285;
            padding-top: 4%;
        }

        .main_panimg01 {
            width: 16%;
            background: inherit;
        }

        .am-panel-bd {
            background: #fff;
            position: relative;
        }

        .main_pan01, .main_pan02 {
            display: block;
            width: 80%;
            text-align: right;
            background: inherit;
            float: right;
        }

        .main_pan01 {
            font-size: 1.7rem;
            color: #fff;
        }

        .main_pan02 {
            margin-top: -8%;
            font-size: 1.2rem;
            color: #ad8347;
        }

        .main_panimg02 {
            width: 100%;
            background: #e8c285;
        }

        .main_pand1 {
            background: inherit;
            display: flex;
            align-items: center;
        }

        .main_panspan2 {
            background: inherit;
            color: #98989a;
            font-size: 1.2rem;
        }

        .main_panimg03 {
            background: inherit;
            width: 5%;
            display: block;
            float: left;
            margin-right: 2%;
        }

        .main_panspan1 {
            background: inherit;
            color: #ad8347;
            float: right;
            font-size: 2rem;
        }
    </style>
</head>
<body>
    <div class="page" v-cloak>

        <header data-am-widget="header" class="am-header am-header-default" style="background-color: #FFFFFF; border-bottom: 1px solid rgb(211, 211, 211);">
            <div class="am-header-left am-header-nav" onclick="goBack()">
                <a href="javascript:" class="">
                    <img class="am-header-icon-custom" src="images/veas07.png" alt="" />
                </a>
            </div>
            <h4 class="am-header-title" style=" color: black;">场馆会员卡</h4>
            <div class="am-header-right am-header-nav"><a href="/Wap/Index.html" class="am-header-icon am-icon-home" style="color: #A9A9A9; "></a></div>
        </header>
        <div class="main">
            <div class="am-panel main_d1" v-for="(list,index) in discount">
                <div class="am-panel-hd" style="margin-bottom: 9%;">
                    <img src="images/vipcard_logo.png" alt="" class="main_panimg01">
                    <span class="main_pan01">{{list.venue.Name}}-{{list.discount.Name}}</span>
                    <span class="main_pan02"></span>
                </div>
                <!--<img src="images/vipcard01.png" alt="" class="main_panimg02" style="margin-top: -9%;">-->
                <div class="am-panel-bd" style="margin-top: -7%;">
                    <div class="main_pand1" style="display: flex; justify-content: space-between;align-items: center;">
                        <div style=" display: flex; align-items: center;">
                            <img src="images/vipcard03.png" alt="" class="main_panimg03" style="width:10%">
                            <span class="main_panspan2">截止 {{list.state}}使用</span>
                        </div>
                    </div>
                    <section data-am-widget="accordion" class="am-accordion am-accordion-gapped" data-am-accordion='{  }' style="margin:0">
                        <dl class="am-accordion-item" style="border:none">
                            <dt class="am-accordion-title" style="text-align: right; border: none; background: rgb(255, 255, 255); font-size: 1.4rem;padding-top: 1%;display: flex; align-items: center; flex-direction: row-reverse;">
                                优惠详细
                            </dt>
                            <dd class="am-accordion-bd am-collapse">
                                <!-- 规避 Collapase 处理有 padding 的折叠内容计算计算有误问题， 加一个容器 -->
                                <div class="am-accordion-content" style="padding:0" v-if="list.discount.discountType>0">
                                    订场优惠：可享{{list.discount.discountType==1?list.discount.discountValue + "元":list.discount.discountValue +"%"}}优惠，每月{{list.discount.number}}次
                                </div>
                                <div class="am-accordion-content" style="padding:0" v-if="list.discount.RcType>0">
                                    人次票优惠：可享{{list.discount.RcType == 1 ? list.discount.RcValue + "元" : list.discount.RcValue +"%"}}优惠，每月{{list.discount.Rcnumber}}次
                                </div>
                            </dd>
                        </dl>
                    </section>

                </div>
            </div>



        </div>
    </div>
</body>
<script src="https://use.fontawesome.com/ca6b609d64.js"></script>
<script src="https://cdn.bootcss.com/jquery/1.8.3/jquery.js"></script>
<script src="js/common.js"></script>
<script src="https://cdn.bootcss.com/vue/2.5.9/vue.js"></script>
<!--<script src="https://cdn.bootcss.com/amazeui/2.7.2/js/amazeui.js"></script>-->
<script>
    var page = new Vue({
        el: '.page',
        data: {
            discount: [],//优惠券/卡数组
        },
        methods: {
            getInfo: function () {
                var that = this;
                $.ajax({
                    type: 'POST',
                    url: apiUrl + '/Api/Mine/GetAllCard',
                    success: function (data) {
                        console.log(data);
                        if (data.errcode == 0) {
                            that.discount = data.data;
                            $.getScript("https://cdn.bootcss.com/amazeui/2.7.2/js/amazeui.js");
                        } else if (data.errcode == -1) {
                            alert(data.errmsg);
                        } else {
                            alert(data.errmsg);
                        }
                    },
                    //error: function () {
                    //    alert("服务器加载异常");
                    //}
                })
            }
        }
    });

    $(function () {
        page.getInfo();
    })

</script>
